package com.itheima.config;

import com.itheima.utils.PasswordService;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Service;

/**
 * @author by itheima
 * @Date 2022/4/22
 * @Description 定义配置类
 */
@Configuration//该注解同样也是@Component的衍生注解，代表的语义：配置，用于取代xml功能
@ComponentScan("com.itheima")//开启注解扫描，作用等价于：<context:component-scan base-package="com.itheima"/>
//@Import(PasswordService.class)
@Import({PasswordService.class,SpringConfig2.class})//批量导入ioc容器，bean的名称是啥？就是类的全限定名称
public class SpringConfig {

//    @Bean
//    public PasswordService passwordService(){
//        return new PasswordService();
//    }

}
